﻿<div class="frame_main">
    <ul>
        <li class="frame_title_line">
            <div class="frame_title">查看照片评论</div>
        </li>

        <li class="detaile_line">
            <table>
                <tbody>
                    <tr class="td_head" height="45">
                        <td style="width:5%;">选项</td>
                        <td style="width:10%;">评论人</td>
                        <td style="width:30%;">评论时间</td>
                        <td style="width:35%;">评论内容</td>
                        <td style="width:20%;">操作</td>
                    </tr>
                    @if (Model != null)
                    {
                        foreach (var item in Model)
                        {
                            <tr>
                                <td><input type="checkbox" value="checkbox" /></td>
                                <td>@item.Students.Name</td>
                                <td>@item.Time.ToShortDateString()</td>
                                <td>@item.Contents</td>
                                <td>
                                    <p>
                                        <a href="javascript:;" onclick="window.open('@Url.Action("Details_Images", "Interaction", new { id = item.ImageID })', '', 'height=500,width=820,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=200,top=100,resizable=yes');">详情信息</a>
                                        <a href="javascript:;" onclick="Delete_This(@item.ID)">删除</a>
                                    </p>
                                </td>
                            </tr>
                        }
                    }
                </tbody>
            </table>
        </li>
    </ul>
</div>
<script type="text/javascript" src="~/Content/EasyUi/jquery.easyui.min.js"></script>
<script>
    function Delete_This(id) {
        $.messager.confirm('警告', '你确定要删除吗?', function (r) {
            if (r) {
                $.post(
                    "@Url.Action("DelImageComment", "Interaction")",
                    { "id": id },
                    function () {
                        location.reload();
                    });
            }
        });
    }
</script>